<div id="news">
<?php $odd_even = 'even';
    foreach ($TARGET->get_view('news_pages') as $k => $news_page) {?>
    <div class="<?php $odd_even == 'even' ? $odd_even = 'odd' : $odd_even = 'even'; echo $odd_even; ?>">
      <div><a href="/news/view/<?php echo $news_page->data->id; ?>"><?php echo $news_page->data->title; ?></a></div>
      <div><?php echo $news_page->data->body; ?></div>
    </div>
    <br>
    <?php }?>
</div>